<script>
    function timedMsg()
    {
        var t=setTimeout("alert('5 seconds!')",5000)
    }
</script>
<div class="bord">
    <div class="title">setTimeout</div>
    <div class="introduce">
        setTimeout() 方法用于在指定的毫秒数后调用函数或计算表达式。
    </div>
</div>
<div class="bord">
    <div class="title">演示效果</div>
    <div class="introduce">
        <form>
            <input type="button" value="显示计时的消息框！" onClick = "timedMsg()">
        </form>
        <p>点击上面的按钮。5 秒后会显示一个消息框。</p>
    </div>
</div>
<div class="bord">
    <div class="title">代码</div>
    <div class="introduce">
        <pre>
             &lt;script&gt;
                    function timedMsg()
        {
            var t=setTimeout("alert('5 seconds!')",5000)
        }
            &lt;/script&gt;
        </pre>
    </div>
</div>